package com.hjw.weixun.filter;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 
 * @author henry_chen
 * session 的监听
 * date 2011-8-5
 *
 */

public class SessionLister implements HttpSessionListener,ServletContextListener{
	private static final Logger  logger = LoggerFactory.getLogger(SessionLister.class);

	@Override
	public void contextDestroyed(ServletContextEvent event) {
		
	}

	@Override
	public void contextInitialized(ServletContextEvent event) {
		
	}

	//session is create
	@Override
	public void sessionCreated(HttpSessionEvent event) {
		System.out.println("session is create" );
		logger.info("session is create");
		
		
	}

	//session 销毁
	@Override
	public void sessionDestroyed(HttpSessionEvent event) {
		
	}

}
